package flychess.entity;

import flychess.util.UserInput;
import java.util.Random;
/**
 * 普通玩家类
 */
public class CommonPlayer extends Player {
    public CommonPlayer() {
        this.playerType = PlayerType.COMMON;
    }

    @Override
    public int rollDice() {
        int step;
        System.out.print(this.getPlayerName() + ", 请您按任意键后回车启动掷骰子： ");
        String answer = UserInput.input.next();
        Random rand = new Random();
        step = rand.nextInt(6) + 1; // 生成1 - 6之间的随机数
        System.out.println("您掷得的骰子数为：" + step);
        return step;
    }
}
